#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_PushButton_target_clicked()
{

}
void Widget::on_PushButton_up_clicked()
{
    QRect rect = ui->PushButton_target->geometry();

    ui->PushButton_target->setGeometry(rect.x(), rect.y() - 5, rect.width(), rect.height());
}

void Widget::on_PushButton_down_clicked()
{
    QRect rect = ui->PushButton_target->geometry();
    ui->PushButton_target->setGeometry(rect.x(), rect.y() + 5, rect.width(), rect.height());
}

void Widget::on_PushButton_left_clicked()
{
    QRect rect = ui->PushButton_target->geometry();
    ui->PushButton_target->setGeometry(rect.x() - 5, rect.y(), rect.width(), rect.height());
}

void Widget::on_PushButton_right_clicked()
{
    QRect rect = ui->PushButton_target->geometry();
    ui->PushButton_target->setGeometry(rect.x() + 5, rect.y(), rect.width(), rect.height());
}


// void Widget::on_PushButton_up_clicked()
// {
//     QRect rect = ui->PushButton_target->geometry();
//     rect.setY(rect.y() - 5);
//     ui->PushButton_target->setGeometry(rect);
// }

// void Widget::on_PushButton_down_clicked()
// {
//     QRect rect = ui->PushButton_target->geometry();
//     rect.setY(rect.y() + 5);
//     ui->PushButton_target->setGeometry(rect);
// }

// void Widget::on_PushButton_left_clicked()
// {
//     QRect rect = ui->PushButton_target->geometry();
//     rect.setX(rect.x() - 5);
//     ui->PushButton_target->setGeometry(rect);
// }

// void Widget::on_PushButton_right_clicked()
// {
//     QRect rect = ui->PushButton_target->geometry();
//     rect.setX(rect.x() + 5);
//     ui->PushButton_target->setGeometry(rect);
// }

